#include <stdio.h>
int main()
{
	FILE* fp = fopen("test.txt", "a+");
  char str[4];
  fgets(str,4,fp); 
  printf("%s\n",str);
  printf("ret=%d\n",ftell(fp));
  fprintf(fp,"hello world");
  printf("ret=%d\n",ftell(fp));	
  fgets(str,4,fp); 
  printf("%s\n",str);
  fprintf(fp,"hello world"); 
  return 0;
}
